import Vue from 'vue'
import { getSize } from '@/utils/cookies'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import Element from 'element-ui'
import './styles/element-variables.scss'
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import i18n from '@/lang'
import './icons' // icon
import './perm' // permission control
import './utils/error-log' // error log

import { getDict } from '@/utils/dict.js'
Vue.prototype.$dictObj = {}
getDict(Vue.prototype.$dictObj)

Vue.use(Element, {
  size: getSize() || 'medium', // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})

import { msgbox } from './mixins/msgbox'
Vue.mixin(msgbox)

// productionTip设置为 false ，可以阻止 vue 在启动时生成生产提示
Vue.config.productionTip = false
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})
